<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    /**
     * 自定义函数分类
     * 1.普通函数定义，function函数名（参数）{函数体}
     * 2.把函数赋值给变量，通过变量调用函数
     * 3.匿名函数
     */
    function sayHello(userName){
        alert("hello"+userName);
    }
    sayHello("zhangsan");

    var showAge=function(age){
        var str="年龄为"+age;    }
    console.log(showAge(20));
</script>
</html>